package com.cungmua.app;

import android.app.Application;

import com.cungmua.app.utils.AppConfig;
import com.sromku.simple.fb.Permissions;
import com.sromku.simple.fb.SimpleFacebook;
import com.sromku.simple.fb.SimpleFacebookConfiguration;

/**
 * Created by kelvin.nguyen on 6/16/14.
 */
public class CungMuaApplication extends Application {
    private int apiVersion;
    private String apiEndPoint;

    @Override
    public void onCreate() {
        super.onCreate();
     //   TestFlight.takeOff(this, "f6501739-5f28-42a7-a811-d36553c56ee6");
        AppConfig.loadConfig(this);

        com.sromku.simple.fb.Permissions[] permissions = new Permissions[]
        {
                Permissions.EMAIL, Permissions.BASIC_INFO
        };
        SimpleFacebookConfiguration configuration = new SimpleFacebookConfiguration.Builder()
                .setAppId(getString(R.string.facebook_app_id))
                .setNamespace("com.cungmua.app")
                .setPermissions(permissions)
                .build();
        SimpleFacebook.setConfiguration(configuration);


    }

    public int getApiVersion() {
        return apiVersion;
    }

    public String getApiEndPoint() {
        return apiEndPoint;
    }
}
